\(\int \frac {A+B x}{x^{3/2} (a+b x)} \, dx\) [349]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [B] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 18, antiderivative size = 49 \[ \int \frac {A+B x}{x^{3/2} (a+b x)} \, dx=-\frac {2 A}{a \sqrt {x}}-\frac {2 (A b-a B) \arctan \left (\frac {\sqrt {b} \sqrt {x}}{\sqrt {a}}\right )}{a^{3/2} \sqrt {b}} \]

[Out]

-2*(A*b-B*a)*arctan(b^(1/2)*x^(1/2)/a^(1/2))/a^(3/2)/b^(1/2)-2*A/a/x^(1/2)

Rubi [A] (verified)

Time = 0.02 (sec) , antiderivative size = 49, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {79, 65, 211} \[ \int \frac {A+B x}{x^{3/2} (a+b x)} \, dx=-\frac {2 (A b-a B) \arctan \left (\frac {\sqrt {b} \sqrt {x}}{\sqrt {a}}\right )}{a^{3/2} \sqrt {b}}-\frac {2 A}{a \sqrt {x}} \]

[In]

Int[(A + B*x)/(x^(3/2)*(a + b*x)),x]

[Out]

(-2*A)/(a*Sqrt[x]) - (2*(A*b - a*B)*ArcTan[(Sqrt[b]*Sqrt[x])/Sqrt[a]])/(a^(3/2)*Sqrt[b])

Rule 65

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[{p = Denominator[m]}, Dist[p/b, Sub
st[Int[x^(p*(m + 1) - 1)*(c - a*(d/b) + d*(x^p/b))^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] &
& NeQ[b*c - a*d, 0] && LtQ[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntLinearQ[a,
b, c, d, m, n, x]

Rule 79

Int[((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Simp[(-(b*e - a*f
))*(c + d*x)^(n + 1)*((e + f*x)^(p + 1)/(f*(p + 1)*(c*f - d*e))), x] - Dist[(a*d*f*(n + p + 2) - b*(d*e*(n + 1
) + c*f*(p + 1)))/(f*(p + 1)*(c*f - d*e)), Int[(c + d*x)^n*(e + f*x)^(p + 1), x], x] /; FreeQ[{a, b, c, d, e,
f, n}, x] && LtQ[p, -1] && ( !LtQ[n, -1] || IntegerQ[p] ||  !(IntegerQ[n] ||  !(EqQ[e, 0] ||  !(EqQ[c, 0] || L
tQ[p, n]))))

Rule 211

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/Rt[a/b, 2]], x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rubi steps \begin{align*} \text {integral}& = -\frac {2 A}{a \sqrt {x}}+\frac {\left (2 \left (-\frac {A b}{2}+\frac {a B}{2}\right )\right ) \int \frac {1}{\sqrt {x} (a+b x)} \, dx}{a} \\ & = -\frac {2 A}{a \sqrt {x}}+\frac {\left (4 \left (-\frac {A b}{2}+\frac {a B}{2}\right )\right ) \text {Subst}\left (\int \frac {1}{a+b x^2} \, dx,x,\sqrt {x}\right )}{a} \\ & = -\frac {2 A}{a \sqrt {x}}-\frac {2 (A b-a B) \tan ^{-1}\left (\frac {\sqrt {b} \sqrt {x}}{\sqrt {a}}\right )}{a^{3/2} \sqrt {b}} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.05 (sec) , antiderivative size = 49, normalized size of antiderivative = 1.00 \[ \int \frac {A+B x}{x^{3/2} (a+b x)} \, dx=-\frac {2 A}{a \sqrt {x}}+\frac {2 (-A b+a B) \arctan \left (\frac {\sqrt {b} \sqrt {x}}{\sqrt {a}}\right )}{a^{3/2} \sqrt {b}} \]

[In]

Integrate[(A + B*x)/(x^(3/2)*(a + b*x)),x]

[Out]

(-2*A)/(a*Sqrt[x]) + (2*(-(A*b) + a*B)*ArcTan[(Sqrt[b]*Sqrt[x])/Sqrt[a]])/(a^(3/2)*Sqrt[b])

Maple [A] (verified)

Time = 0.47 (sec) , antiderivative size = 40, normalized size of antiderivative = 0.82

method result size
derivativedivides \(-\frac {2 A}{a \sqrt {x}}+\frac {2 \left (-A b +B a \right ) \arctan \left (\frac {b \sqrt {x}}{\sqrt {a b}}\right )}{a \sqrt {a b}}\) \(40\)
default \(-\frac {2 A}{a \sqrt {x}}+\frac {2 \left (-A b +B a \right ) \arctan \left (\frac {b \sqrt {x}}{\sqrt {a b}}\right )}{a \sqrt {a b}}\) \(40\)
risch \(-\frac {2 A}{a \sqrt {x}}-\frac {2 \left (A b -B a \right ) \arctan \left (\frac {b \sqrt {x}}{\sqrt {a b}}\right )}{a \sqrt {a b}}\) \(40\)

[In]

int((B*x+A)/x^(3/2)/(b*x+a),x,method=_RETURNVERBOSE)

[Out]

-2*A/a/x^(1/2)+2*(-A*b+B*a)/a/(a*b)^(1/2)*arctan(b*x^(1/2)/(a*b)^(1/2))

Fricas [A] (verification not implemented)

none

Time = 0.23 (sec) , antiderivative size = 112, normalized size of antiderivative = 2.29 \[ \int \frac {A+B x}{x^{3/2} (a+b x)} \, dx=\left [-\frac {2 \, A a b \sqrt {x} - {\left (B a - A b\right )} \sqrt {-a b} x \log \left (\frac {b x - a + 2 \, \sqrt {-a b} \sqrt {x}}{b x + a}\right )}{a^{2} b x}, -\frac {2 \, {\left (A a b \sqrt {x} + {\left (B a - A b\right )} \sqrt {a b} x \arctan \left (\frac {\sqrt {a b}}{b \sqrt {x}}\right )\right )}}{a^{2} b x}\right ] \]

[In]

integrate((B*x+A)/x^(3/2)/(b*x+a),x, algorithm="fricas")

[Out]

[-(2*A*a*b*sqrt(x) - (B*a - A*b)*sqrt(-a*b)*x*log((b*x - a + 2*sqrt(-a*b)*sqrt(x))/(b*x + a)))/(a^2*b*x), -2*(
A*a*b*sqrt(x) + (B*a - A*b)*sqrt(a*b)*x*arctan(sqrt(a*b)/(b*sqrt(x))))/(a^2*b*x)]

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 178 vs. \(2 (46) = 92\).

Time = 0.80 (sec) , antiderivative size = 178, normalized size of antiderivative = 3.63 \[ \int \frac {A+B x}{x^{3/2} (a+b x)} \, dx=\begin {cases} \tilde {\infty } \left (- \frac {2 A}{3 x^{\frac {3}{2}}} - \frac {2 B}{\sqrt {x}}\right ) & \text {for}\: a = 0 \wedge b = 0 \\\frac {- \frac {2 A}{3 x^{\frac {3}{2}}} - \frac {2 B}{\sqrt {x}}}{b} & \text {for}\: a = 0 \\\frac {- \frac {2 A}{\sqrt {x}} + 2 B \sqrt {x}}{a} & \text {for}\: b = 0 \\- \frac {A \log {\left (\sqrt {x} - \sqrt {- \frac {a}{b}} \right )}}{a \sqrt {- \frac {a}{b}}} + \frac {A \log {\left (\sqrt {x} + \sqrt {- \frac {a}{b}} \right )}}{a \sqrt {- \frac {a}{b}}} - \frac {2 A}{a \sqrt {x}} + \frac {B \log {\left (\sqrt {x} - \sqrt {- \frac {a}{b}} \right )}}{b \sqrt {- \frac {a}{b}}} - \frac {B \log {\left (\sqrt {x} + \sqrt {- \frac {a}{b}} \right )}}{b \sqrt {- \frac {a}{b}}} & \text {otherwise} \end {cases} \]

[In]

integrate((B*x+A)/x**(3/2)/(b*x+a),x)

[Out]

Piecewise((zoo*(-2*A/(3*x**(3/2)) - 2*B/sqrt(x)), Eq(a, 0) & Eq(b, 0)), ((-2*A/(3*x**(3/2)) - 2*B/sqrt(x))/b,
Eq(a, 0)), ((-2*A/sqrt(x) + 2*B*sqrt(x))/a, Eq(b, 0)), (-A*log(sqrt(x) - sqrt(-a/b))/(a*sqrt(-a/b)) + A*log(sq
rt(x) + sqrt(-a/b))/(a*sqrt(-a/b)) - 2*A/(a*sqrt(x)) + B*log(sqrt(x) - sqrt(-a/b))/(b*sqrt(-a/b)) - B*log(sqrt
(x) + sqrt(-a/b))/(b*sqrt(-a/b)), True))

Maxima [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 39, normalized size of antiderivative = 0.80 \[ \int \frac {A+B x}{x^{3/2} (a+b x)} \, dx=\frac {2 \, {\left (B a - A b\right )} \arctan \left (\frac {b \sqrt {x}}{\sqrt {a b}}\right )}{\sqrt {a b} a} - \frac {2 \, A}{a \sqrt {x}} \]

[In]

integrate((B*x+A)/x^(3/2)/(b*x+a),x, algorithm="maxima")

[Out]

2*(B*a - A*b)*arctan(b*sqrt(x)/sqrt(a*b))/(sqrt(a*b)*a) - 2*A/(a*sqrt(x))

Giac [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 39, normalized size of antiderivative = 0.80 \[ \int \frac {A+B x}{x^{3/2} (a+b x)} \, dx=\frac {2 \, {\left (B a - A b\right )} \arctan \left (\frac {b \sqrt {x}}{\sqrt {a b}}\right )}{\sqrt {a b} a} - \frac {2 \, A}{a \sqrt {x}} \]

[In]

integrate((B*x+A)/x^(3/2)/(b*x+a),x, algorithm="giac")

[Out]

2*(B*a - A*b)*arctan(b*sqrt(x)/sqrt(a*b))/(sqrt(a*b)*a) - 2*A/(a*sqrt(x))

Mupad [B] (verification not implemented)

Time = 0.07 (sec) , antiderivative size = 50, normalized size of antiderivative = 1.02 \[ \int \frac {A+B x}{x^{3/2} (a+b x)} \, dx=\frac {2\,B\,\mathrm {atan}\left (\frac {\sqrt {b}\,\sqrt {x}}{\sqrt {a}}\right )}{\sqrt {a}\,\sqrt {b}}-\frac {2\,A\,\sqrt {b}\,\mathrm {atan}\left (\frac {\sqrt {b}\,\sqrt {x}}{\sqrt {a}}\right )}{a^{3/2}}-\frac {2\,A}{a\,\sqrt {x}} \]

[In]

int((A + B*x)/(x^(3/2)*(a + b*x)),x)

[Out]

(2*B*atan((b^(1/2)*x^(1/2))/a^(1/2)))/(a^(1/2)*b^(1/2)) - (2*A*b^(1/2)*atan((b^(1/2)*x^(1/2))/a^(1/2)))/a^(3/2
) - (2*A)/(a*x^(1/2))